//
//  UILable+Extension.swift
//  XJWeiBo
//
//  Created by 徐健 on 16/3/14.
//  Copyright © 2016年 徐健. All rights reserved.
//

import UIKit

extension UILabel{
    class func lableWith(textColor:UIColor,text:String,fontSize:CGFloat)->UILabel{
        let l = UILabel()
        
        l.text = text
        
        l.textColor = textColor
        
        l.font = UIFont.systemFontOfSize(fontSize)
        
        //居中
        l.textAlignment = .Center
        
        //设置自动换行
        l.numberOfLines = 0
        
        l.sizeToFit()
        
        return l
    }
}
